#line 1 "D:/Mikroelektronika/mikroC PRO for AVR/Examples/MyProject.c"


void USARTInit(int ubrr_value)
{



 UBRRL = ubrr_value;
 UBRRH = (ubrr_value>>8);
#line 22 "D:/Mikroelektronika/mikroC PRO for AVR/Examples/MyProject.c"
 UCSRC=(1<<URSEL)|(3<<UCSZ0);




 UCSRB=(1<<RXEN)|(1<<TXEN);


}





char USARTReadChar()
{


 while(!(UCSRA & (1<<RXC)))
 {

 }




 return UDR;
}




void USARTWriteChar(char data)
{


 while(!(UCSRA & (1<<UDRE)))
 {

 }



 UDR=data;
}

void main()
{





 char data;
#line 85 "D:/Mikroelektronika/mikroC PRO for AVR/Examples/MyProject.c"
 USARTInit(51);



 while(1)
 {

 data=USARTReadChar();
#line 100 "D:/Mikroelektronika/mikroC PRO for AVR/Examples/MyProject.c"
 USARTWriteChar('[');
 USARTWriteChar(data);
 USARTWriteChar(']');

 }
}
